<template>
	<!-- 机构管理员注册页 -->
	<view>
		<!-- 自定义导航栏 -->
		<view class="navBarBox">
			<!-- 状态栏占位 -->
			<view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view>
			<!-- 真正的导航栏内容 -->
			<view class="navBar">
				<view class="goback">
					<view @click="goBack" class="goicon" style="background:url('../../../static/goback.png');background-size:contain;background-repeat: no-repeat;">			
					</view>
				</view>
				<view class="titlen">机构管理员注册</view>
				<view class="right"> 
				</view>
			</view>
		</view>
		<view class="black-strip"></view>
		<view class="jigouMsg pl">
			<view class="title">
				<view class="common-tit">
					<text  >基本信息</text>
				</view>
			</view>
			<view class="msg">
				<view class="common1" @click="goVegify">
					<text class="tit1">机构名称</text>
					<text class="tit2">{{jigouMsg.Name}}</text>
				</view>
				<view class="common1">
					<text class="tit1">机构所在地</text>
					<text class="tit2 qiequ">{{jigouMsg.address}}</text>
				</view>
				<view class="common1">
					<text class="tit1">机构简介</text>
					<text class="tit2">{{jigouMsg.jianjie}}</text>
				</view>
				<view class="common1">
					<text class="tit1">联系人</text>
					<text class="tit2">{{jigouMsg.contacts}}</text>
				</view>
				<view class="common1">
					<text class="tit1">联系电话</text>
					<text class="tit2">{{jigouMsg.phone}}</text>
				</view>
				<view class="common1">
					<text class="tit1">老师规模</text>
					<text class="tit2">{{jigouMsg.peoples}}人</text>
				</view>
				<view class="common1">
					<text class="tit1">场地面积</text>
					<text class="tit2">{{jigouMsg.area}}m²</text>
				</view>
			</view>
		</view>
		<view class="black-strip"></view>
		<!-- 营业执照 -->
		<view class="zhizhao pl">
			<view class="title">
				<view class="common-tit">
					<text>营业执照</text>
				</view>
			</view>
			<view class="msg">
				<view class="common1">
					<text class="tit1">执照名称</text>
					<text class="tit2">{{jigouMsg.Name}}</text>
				</view>
				<view class="common1">
					<text class="tit1">执照号码</text>
					<text class="tit2">{{jigouMsg.zhizhoNumber}}</text>
				</view>
				<view class="common1">
					<text class="tit1">机构所在地</text>
					<image :src="jigouMsg.zhizhaoUrl" class="img-size"></image>
				</view>
			</view>
		</view>
		<view class="black-strip"></view>
		<!-- 办学许可 -->
		<view class="zhizhao pl">
			<view class="title">
				<view class="common-tit">
					<text>办学许可</text>
				</view>
			</view>
			<view class="msg">
				<view class="common1">
					<text class="tit1">执照名称</text>
					<text class="tit2">{{jigouMsg.Name}}</text>
				</view>
				<view class="common1">
					<text class="tit1">所在地址</text>
					<text class="tit2">{{jigouMsg.address}}</text>
				</view>
				<view class="common1">
					<text class="tit1">办学许可证</text>
					<!-- <text class="tit2">{{jigouMsg.zhizhaoUrl}}</text> -->
					<image  class="img-size"></image>
				</view>
			</view>
		</view>
		<view class="black-strip"></view>
		<!-- 社会团体法人登记 -->
		<view class="zhizhao pl">
			<view class="title">
				<view class="common-tit">
					<text>社会团体法人登记</text>
				</view>
			</view>
			<view class="msg">
				<view class="common1">
					<text class="tit1">法人姓名</text>
					<text class="tit2">{{jigouMsg.farenName}}</text>
				</view>
				<view class="common1">
					<text class="tit1">法人身份证号</text>
					<text class="tit2">{{jigouMsg.farenId}}</text>
				</view>
				<view class="common1">
					<text class="tit1">上传凭证</text>
					<image  class="img-size"></image>
				</view>
			</view>
		</view>
		
		<view class="black-strip"></view>
		<!-- 历史成果案例 -->
		<view class="chengguoanli pl">
			<view class="title">
				<view class="common-tit">
					<text>历史成果案例</text>
				</view>
			</view>
			<view class="msg">
				<view class="chengguo">
					<textarea :value="jigouMsg.historical"/>
				</view>
			</view>
		</view>
		<!-- 跳转按钮 -->
		<view class="submit">
			<button type="default" class="button-hover" @click="goRegVerify">跳转</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 状态栏高度
				statusBarHeight: 0,
				// 导航栏高度
				navBarHeight: 82+11,
				// 机构注册的信息
				jigouMsg:{
					Name: '',
					address: '',
					jianjie: '',
					contacts: '',
					phone: '',
					peoples: '',
					area: '',
					zhizhoNumber: '',
					farenName: '',
					farenId: '',
					zhizhaoUrl: '',
					historical:'',
					id:'',
				},
			}
		},
		
		//第一次加载时调用
		created() {
			//获取手机状态栏高度
			this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
		},
		onLoad: function (e) { //e为object类型，会序列化上个页面传递的参数
		    var data = wx.getStorageSync('mechManagRegisterData');
			console.log(data.license[0]);
		
			this.jigouMsg.Name=data.organizationName;
			this.jigouMsg.address=data.province+data.city+data.county;
			this.jigouMsg.jianjie=data.intro;
			this.jigouMsg.contacts=data.linkman;
			this.jigouMsg.phone=data.phone;
			this.jigouMsg.peoples=data.teacherScale;
			this.jigouMsg.area=data.floorSpace;
			this.jigouMsg.zhizhoNumber=data.licenseNumber;
			this.jigouMsg.farenName=data.personRegistration;
			this.jigouMsg.farenId=data.licenseNumber;
			this.jigouMsg.zhizhaoUrl=data.license[0];
			this.jigouMsg.historical=data.historical;
			this.jigouMsg.id=data.id;
		
		},
		methods:{
			goBack(){
				uni.navigateBack({
					delta: 1//返回只上一级页面
				});
			},
			goVegify(){
				console.log("点我了")
				uni.navigateTo({
				    url:'./mechManagRegVerify'
				});
			},
			// 提交审核-进入资料审核页
			goRegVerify(){
				uni.navigateTo({
						url:'../../teacher?'+this.jigouMsg.id
				})
			
			},
		}
	}
</script>

<style lang="less">
	.navBarBox .navBar {
			padding: 3rpx 50rpx;
			padding-bottom: 8rpx;
			display: flex;
			justify-content: space-between;
			line-height: 93rpx;
			font-size: 40rpx;
		}
	
	.goback {
		flex: 1;
		height: 100%;
	}
	.goicon{
		width: 30rpx;
		height: 30rpx;
		background-color: #00BEA9;
		margin-top: 30rpx;
	}
	.titlen {
		font-size: 40rpx;
		flex: 2;
		height: 100%;
		
	}
	.right{
		flex: 1;
	}
	 
	.black-strip {
		height: 20rpx;
		background-color: #fafafa;
	}
	.pl {
		padding-left: 30rpx;
	}
	.jigouMsg {
		height: 870rpx;
		background-color: #fff;
	}
	.title {
		height: 118rpx;
		display: flex;
		align-items: center;
	}
	.common-tit {
		height: 24rpx;
		background-color: #a2f8ee;
		display: flex;
		justify-content: center;
		align-items: center;
		text {
			font-size:38rpx;
		}
	}
	.msg {
		margin-top: 18rpx;
		// padding-left: 76rpx;
	}
	.common1 {
		height: 104rpx;
		display: flex;
		.tit1 {
			width: 220rpx;
			color: rgba(18, 18, 18, .5);
			font-size: 32rpx;
		}
		.tit2 {
			width: 400rpx;
			font-size: 32rpx;
			color: rgb(18, 18, 18);
		}
	}
	.qiequ {
		height: 104rpx;
		overflow: hidden;
		overflow:auto;
	}
	.zhizhao {
		height: 630rpx;
	}
	.img-size {
		width: 186rpx;
		height: 186rpx;
	}
	.chengguoanli {
		height: 370rpx;
	}
	.chengguo {
		padding-right: 28rpx;
		textarea {
			width: 100%;
			height: 174rpx;
			border: 2rpx solid #eee;
			font-size: 32rpx;
		}
	}
	.submit {
		height: 156rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		button {
			width: 228rpx;
			height: 70rpx;
			background-color: #2db3fe;
			color: #fff;
			font-size: 28rpx;
			border: none;
			box-shadow: 0 0 20rpx 3rpx rgba(180,226,251);
			
		}
	}
	.button-hover[type="default"] {
		color: #fff;
		background-color: #118ace;
	}
</style>
